#ifndef BOSS_Afterburner_Globals_Settings_H
#define BOSS_Afterburner_Globals_Settings_H

/// @defgroup Afterburner_functions Functions
/// Header files containing helper **functions** that can be used in the eventual scripts.

/// @defgroup Afterburner_objects Helper objects
/// Base and derived **classes** that represent the structure of BOSS output files.

/// @defgroup Afterburner_settings Settings
/// Global **parameters** that represent default settings of the *BOSS Afterburner*.

/// @defgroup Afterburner_scripts Scripts
/// Analysis **scripts** of the *BOSS Afterburner*. These are contain the eventual analysis code of the BOSS output files and make use of the objects defined under `inc`.

#include "Globals/SettingsHandler.h"
#include "Particle/Particle.h"
#include "TColor.h"
#include "TString.h"
#include <vector>

// * For backward compatibility with ROOT5 * //
#ifdef __CINT__
#  include <TLatex.h>
#  define GET_PTR(VARIABLE) VARIABLE ///< Definition of pointer in case of ROOT5.
#  define SHARED_PTR(TYPE) TYPE*     ///< Definition of shared pointer in case of ROOT5.
#  define UNIQUE_PTR(TYPE) TYPE*     ///< Definition of unique pointer in case of ROOT5.
#else
#  define GET_PTR(VARIABLE) (VARIABLE).get() ///< Definition of pointer in case of ROOT6 or higher.
#  define SHARED_PTR(TYPE) \
    std::shared_ptr<TYPE> ///< Definition of shared pointer in case of ROOT6 or higher.
#  define UNIQUE_PTR(TYPE) \
    std::unique_ptr<TYPE> ///< Definition of unique pointer in case of ROOT6 or higher.
#endif

/// @addtogroup Afterburner_settings
/// @{

/// Helper namespace in case of `C++11` compilation. The `std::make_unique` method of `std::unique_ptr` has not been defined by default and needs to be defined seperately, hence the '`_fix`' of `std`.
/// @author   Remco de Boer 雷穆克 (r.e.deboer@students.uu.nl or remco.de.boer@ihep.ac.cn)
/// @date     October 25th, 2018
namespace std_fix
{
  template <typename T, typename... Args>
  std::unique_ptr<T> make_unique(Args&&... args)
  {
    return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
  }
} // namespace std_fix

/// Header with a namespace `Settings` that contains *all* settings for the analysis framework.
/// The `Settings` namespace has been split up into several sub-namespaces.
/// @author   Remco de Boer 雷穆克 (r.e.deboer@students.uu.nl or remco.de.boer@ihep.ac.cn)
/// @date     October 25th, 2018
namespace BOSS_Afterburner
{
  namespace Detector
  {
    inline constexpr double TofUnitCm = 29.9792458;
    inline constexpr double TofUnitMm = 299.792458;
    namespace Units
    {
      inline const char* GeVc2 = "GeV/#it{c}^{2}";
      inline const char* MeVc2 = "GeV/#it{c}^{2}";
    } // namespace Units
  }   // namespace Detector
  namespace File
  {
    inline const char* gConfigs       = "configs";
    inline const char* gExtension     = "pdf";
    inline const char* gPlotOutputDir = "output";
  } // namespace File
  namespace Fit
  {
    inline double gSigmaScaleFactorLow = 0.;
    inline double gSigmaScaleFactorUp  = 10.;
  } // namespace Fit
  namespace Draw
  {
    inline const std::vector<Color_t> gColorPalette{kRed - 4, kBlue, kGreen + 2, kOrange + 1};
  }
  namespace Error
  {
    enum FileStatus
    {
      DoesNotExist,
      IsZombie,
      Alive
    };
    enum Constructor
    {
      Failed,
      Succes
    };
    enum Pointer
    {
      Empty
    };
  } // namespace Error
} // namespace BOSS_Afterburner

/// @}
#endif